// sql语句
// SELECT * FROM hg_users   查询hg_users表中所有的数据
// SELECT 字段1,字段2,字段3,字段... FROM hg_users

// 查询hg_users表中age大于20的数据
// >大于 >=大于等于 <小于 <=小于等于 !=不等于
// SELECT id,username,password,age FROM hg_users WHERE age > 20

// or 或者
// SELECT id, username, password, age FROM hg_users WHERE age > 22 or age < 22

// and 并且
// SELECT * from hg_users WHERE age = 18 and username = "admin"

//ORDER BY 排序    ASC (小到大)升序  DESC (大到小)降序
// SELECT * from hg_users ORDER BY age ASC

// 分页

// http://localhos:3000/userlist?page=1&size=10
// SELECT * from hg_users ORDER BY age asc LIMIT 索引,每页的条数
// SELECT * from hg_users ORDER BY age asc LIMIT (page-1)*size,size


// 模糊查询

// 查询用户名中包含有二哥的数据
// SELECT * FROM hg_users WHERE username LIKE "%二哥%"

// 查询用户名以二哥开头的数据
// SELECT * FROM hg_users WHERE username LIKE "二哥%"

// 查询用户名以二哥结尾的数据
// SELECT * FROM hg_users WHERE username LIKE "%二哥"

// 别名查询
// SELECT id AS u_id,username as nickname ,`password` as login_password FROM hg_users WHERE username LIKE "%二哥"



// 增加数据
// INSERT INTO hg_users (username,password,LEVEL,is_show,create_time) VALUES ("好谷就业力","123456",1,1,"2022-02-11 15:10:15")

// INSERT INTO hg_users SET username="好谷大咖",PASSWORD="123456",LEVEL=1,is_show=1,create_time="2022-02-11 15:11:11"


// 修改数据
// UPDATE 表名 SET 字段=值 WHERE 条件
// UPDATE hg_users SET age=38 WHERE id=5

// 删除数据
// DELETE FROM hg_users WHERE id=3

